home *** CD-ROM | disk | FTP | other *** search
- /**********************************Comment*****************************************
- * These are all the constants we want to export to the world. Anyone who wants to
- * use the driver will include this header in their code. The IACRecord is the
- * structure by which the caller specifies who to send messages to (or receive
- * messages from). It's also used for the other control (or status) routines which
- * set or return information.
- **********************************End Comment************************************/
-
- #ifndef __IACHeaders__ // Define so we don't include twice.
- #define __IACHeaders__
-
- #include <Types.h>
- #include <Traps.h>
- #include <Files.h> // One thing which as always bugged me is that
- #include <Devices.h> // the parameter block definition is in Files.h.
- #include <Memory.h>
-
- const short kAbnormErr = 1;
- const short kNoMore = -1;
- const short kBadCsCode = -2;
- const short kMsgMemErr = -3;
- const short kNoErr = 0;
- const short kNoRead = -96;
- const short kNoWrite = -97;
- const short kMoreMessages = 98;
- const short kYesMessagesForMe = 99;
- const char kZeroChar = '\0';
-
- // csCodes for Control Calls
- const short kGoodbye = -1;
- const short kKillIO = 1;
- const short kRegisterApp = 2;
- const short kSendMessage = 3;
- const short kReceiveMessage = 4;
- const short kUnregisterApp = 5;
-
- // csCodes for Status Calls
- const short kAnyMsgForMe = 2;
- const short kWhosThere = 3;
-
- struct IACRecord {
- short mySignature; // Signature number of application sending/receiving
- short partnerSig; // Signature of app that's either sent a message
- // or off app which the current app is sending to.
- short indexForWhosThere; // Index to cycle through the applications which
- // have registered.
- short actualCount; // Non zero if messages there for recipient.
- char* messageString; // Message string being sent or received.
- char *appName; // String to register as.
- };
- typedef struct IACRecord IACRecord;
-
-
- #include "TDriver.h"
- #include "TMessage.h"
- #include "DriverWrapper.h"
- #endif